{include "cms/lib/header"}
{include "cms/lib/nav"}
<link rel="stylesheet" href="/static/cms/css/saas.css">
{literal}
<div id="saas">
    <div class="layui-container">
        <div class="layui-panel">
            <div class="layui-card-header">创建SAAS服务</div>
            <div class="layui-form layui-form-pane" style="margin-top: 20px">
                <div class="layui-form-item">
                    <label class="layui-form-label">应用名称</label>
                    <div class="layui-input-block">
                        <input
                            type="text"
                            name="saas_as_domain"
                            :value="{{ addForm.saas_as_domain }}"
                            @input="inputChange"
                            required
                            placeholder="请输入应用名称"
                            autocomplete="off"
                            class="layui-input"
                        />
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">应用服务器</label>
                    <div class="layui-input-block">
                        <selectDom props-type="server_id" props-list="serverList"></selectDom>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">绑定域名</label>
                    <div class="layui-input-block">
                        <input
                            type="text"
                            name="saas_domain"
                            :value="{{ addForm.saas_domain }}"
                            @input="inputChange"
                            required
                            placeholder="绑定域名"
                            autocomplete="off"
                            class="layui-input"
                        />
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">数据服务器</label>
                    <div class="layui-input-block">
                        <selectDom props-type="server_db_id" props-list="dbServerList"></selectDom>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">数据库账户</label>
                    <div class="layui-input-block">
                        <input
                            type="text"
                            name="db_user"
                            :value="{{ addForm.db_user }}"
                            @input="inputChange"
                            required
                            placeholder="请输入数据库账户"
                            autocomplete="off"
                            class="layui-input"
                        >
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">数据库密码</label>
                    <div class="layui-input-block">
                        <input
                            type="text"
                            name="db_password"
                            :value="{{ addForm.db_password }}"
                            @input="inputChange"
                            required
                            placeholder="请输入数据库密码"
                            autocomplete="off"
                            class="layui-input"
                        />
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">数据库名</label>
                    <div class="layui-input-block">
                        <input
                            type="text"
                            name="db_name"
                            :value="{{ addForm.db_name }}"
                            @input="inputChange"
                            required
                            placeholder="请输入数据库名"
                            autocomplete="off"
                            class="layui-input"
                        />
                    </div>
                </div>
                <div class="layui-btn layui-btn-normal" style="width: 100%;" @click="addSaasAccount">
                    <span>确定创建</span>
                </div>
            </div>
        </div>
    </div>
</div>
{/literal}
<script src="/static/cms/js/api/saas.js"></script>
<script src="/static/cms/js/saas/saas.js"></script>
{include "cms/lib/foot"}